/* 
 * File:   app_7seg.h
 * Author: Omar Sevilla
 *
 * Created on 7 de diciembre de 2013, 02:51 AM
 */

/*7 seg pins
 *      ------ +
 *      ------ Digit 3
 *      ------ Digit 2
 *      ------ Digit 1
 *      ------ f
 *      ------ g
 *      ------ a
 *      ------ b
 *      ------ c
 *      ------ d
 *      ------ e
*/

#ifndef APP_7SEG_H
#define	APP_7SEG_H

#ifdef	__cplusplus
extern "C" {
#endif
    
#include "system.h"
#include "stdtypedef.h"
//Definiciones para protoboard
//#define PIN_A_7SEG  RC4
//#define PIN_B_7SEG  RC5
//#define PIN_C_7SEG  RB0
//#define PIN_D_7SEG  RB1
//#define PIN_E_7SEG  RB2
//#define PIN_F_7SEG  RC2
//#define PIN_G_7SEG  RC3

//Definiciones para EVO873
#define PIN_A_7SEG  RB4
#define PIN_B_7SEG  RB3
#define PIN_C_7SEG  RB2
#define PIN_D_7SEG  RB1
#define PIN_E_7SEG  RB0
#define PIN_F_7SEG  RB6
#define PIN_G_7SEG  RB5

#define DIGITS      3
#define DIGIT1      0
#define DIGIT2      1
#define DIGIT3      2

//#define DIGIT1_MUX_PORT     RA0
//#define DIGIT2_MUX_PORT     RA1
//#define DIGIT3_MUX_PORT     RA2

#define DIGIT1_MUX_PORT     RB7
#define DIGIT2_MUX_PORT     RA1
#define DIGIT3_MUX_PORT     RA0

    extern void print_7seg(T_UWORD luw_Data);
    extern void app_7SegMux(void);
    extern void digits_off(void);
    extern void digits_on(void);

#ifdef	__cplusplus
}
#endif

#endif	/* APP_7SEG_H */

